package com.chenfan.process.biz.impl;

import com.chenfan.process.biz.ApprovalBizService;
import com.chenfan.process.entity.po.ApprovalPo;
import com.chenfan.process.vo.ApprovalVo;
import com.chenfan.process.service.ApprovalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Objects;

/**
 * @author K
 * @date 2021/3/4
 */
@Service
public class ApprovalBizServiceImpl implements ApprovalBizService {

    @Autowired
    private ApprovalService approvalService;

    @Override
    public ApprovalVo findApprovalByApprovalId(Long approvalId) {
        ApprovalPo approval = approvalService.findApprovalByApprovalId(approvalId);
        return Objects.isNull(approval) ? null : approval.copyApprovalVo();
    }
}
